Skip to content

refactor: replace sort.Slice with slices.Sort for natural ordering#1075

Open
tsinglua wants to merge 1 commit intocosmos:mainfrom
tsinglua:main
Open

refactor: replace sort.Slice with slices.Sort for natural ordering#1075
tsinglua wants to merge 1 commit intocosmos:mainfrom
tsinglua:main

Conversation

@tsinglua
Copy link
Copy Markdown

@tsinglua tsinglua commented Mar 12, 2026

Description

There is a new function added in the go1.21 standard library, which can make the code more concise and easy to read.

The new signed pr for #1068


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • tackled an existing issue or discussed with a team member
  • left instructions on how to review the changes
  • targeted the main branch

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 12, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 65.48%. Comparing base (43a1f17) to head (bf44f9c).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
x/vm/keeper/params.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1075      +/-   ##
==========================================
+ Coverage   65.45%   65.48%   +0.03%     
==========================================
  Files         331      331              
  Lines       23262    23258       -4     
==========================================
+ Hits        15225    15231       +6     
+ Misses       6894     6884      -10     
  Partials     1143     1143              
Files with missing lines Coverage Δ
utils/utils.go 74.77% <100.00%> (-0.45%) ⬇️
x/vm/keeper/params.go 67.79% <0.00%> (+2.22%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aljo242
Copy link
Copy Markdown
Contributor

aljo242 commented Mar 12, 2026

are there tests that validate thiss?

Signed-off-by: tsinglua <tsinglua@outlook.com>
@tsinglua
Copy link
Copy Markdown
Author

are there tests that validate thiss?

@aljo242 The corresponding test cases have been added. Please review again.

@tsinglua
Copy link
Copy Markdown
Author

tsinglua commented Apr 10, 2026

@yihuang @aljo242 Hi, Could you please review this PR at your convenience? Thank you very much.

Copy link
Copy Markdown
Collaborator

@yihuang yihuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants